﻿<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1.0" />
    <title>图片分享社区-欢迎登陆</title>
<link href="${pageContext.request.contextPath}/CSS/animate.min.css" rel="stylesheet"/>
     <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/CSS/bootstrap.css" />
<link href="${pageContext.request.contextPath}/CSS/base.css" rel="stylesheet"/>
    <style type="text/css">
        html,body {
            height: 100%;
  background-color: #eeeeee;
        }
	.top{
	   height:80px;
	   
	}
	.logo{
	   width:1200px;
	   margin:0 auto;
	   overflow:hidden;
	   font-family: iconfont!important;
	   
	}
	.bottom{
	     height:50px;
	}
        .box {
	    background-size:cover;
           
            margin: 0 auto;
            position: relative;
            width: 100%;
            height: 80%;
        }
        .login-box {
            width: 100%;
            max-width:500px;
            height: 400px;
            position: absolute;
            top: 50%;
            margin-top: -150px;
            /*设置负值，为要定位子盒子的一半高度*/

        }
        @media screen and (min-width:500px){
            .login-box {
                left: 50%;
                /*设置负值，为要定位子盒子的一半宽度*/
                margin-left: -250px;
            }
        }

        .form {
            width: 100%;
            max-width:500px;
            height: 275px;
            margin: 25px auto 0px auto;
            padding-top: 25px;
        }
        .login-content {
            height: 300px;
            width: 100%;
            max-width:500px;
          background-color: rgba(255, 250, 2550, .9);
            float: left;
            
        }


        .input-group {
            margin: 0px 0px 30px 0px !important;
        }
        .form-control,
        .input-group {
            height: 40px;
        }

        .form-group {
            margin-bottom: 0px !important;
        }
        .login-title {
            padding: 20px 10px;
           background-color: #2196f3;
        }
        .login-title h1 {
            margin-top: 10px !important;
        }
        .login-title small {
            color: #fff;
        }

        .link p {
            line-height: 20px;
            margin-top: 30px;
        }
        .btn-sm {
            padding: 8px 24px !important;
            font-size: 16px !important;
        }
    </style>

</head>

<body>
<nav class="navbar navbar-inverse navbar-fixed-top">
      <div class="container" >
        <div class="navbar-header">
          <a class="navbar-brand" href="fonthead.action">
						<span class="nav-title">图片分享社区</span>
					</a>
        </div>

        <div id="navbar" class="navbar-collapse collapse" >
          <div class="navbar-form navbar-right">
						<li class="dropdown" >
			        <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
								<s:if test="#session.IMG==null">
								<img class="img-circle" style="height: 40px;" src="${pageContext.request.contextPath}/IMG/headimg.jpg">
							</s:if>
							<s:else>
							<img class="img-circle" style="height: 40px;" src='<s:property value="#session.IMG"/>'>
							</s:else>
							</a>
						
						<s:if test="#session.ID==null">
			        <ul class="dropdown-menu">
			         <li><a href="loginfont.action">登陆</a></li>
			           <li role="separator" class="divider"></li>
			           <li><a href="registerpage.action">注册</a></li>
			
			        </ul>
			        </s:if>
			        <s:else>
			         <ul class="dropdown-menu">

			 <li><a href="userprofile.action?id=<s:property value="#session.ID"/>">个人主页</a></li>
			          <li role="separator" class="divider"></li>
			              <li><a href="alelterpassword.action">修改密码</a></li>
			           <li role="separator" class="divider"></li>
			          <li><a href="logoutfont.action">注销</a></li>
			        </ul>
			        </s:else>
			      </li>
          </div>
        </div>
      </div>
    </nav>
<div class="box animated rotateIn">
    <div class="login-box">
        <div class="login-title text-center">
            <h1><small>账户登录</small></h1>
        </div>
        <div class="login-content ">
            <div class="form">
                <form action="loginfontsresult.action" method="post">
                    <div class="form-group">
                        <div class="col-xs-12  ">
                            <div class="input-group">
                                <span class="input-group-addon"><span class="glyphicon glyphicon-user"></span></span>
                                <input type="text" id="username" maxLength="12" name="user.username" class="form-control" placeholder="用户名">
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-xs-12  ">
                            <div class="input-group">
                              <span class="input-group-addon"><span class="glyphicon glyphicon-lock"></span></span>
                                <input type="password" id="password" maxLength="12" name="user.password" class="form-control" placeholder="密码">
                            </div>
                        </div>
                    </div>
                    <div class="form-group form-actions">
                        <div class="col-xs-12">
                            <button type="submit" class="btn btn-info form-control btn btn-primary btn-lg"><span class="glyphicon glyphicon-off"></span> 登录</button>
                        </div>
                    </div>

                </form>
            </div>
        </div>
    </div>
</div>
<!--footer-->
<footer>
    <div class="container" style="text-align:center">
        <div class="row">
            <div class="col-md-12">
                <p>
                    Copyright&nbsp;©&nbsp;2012-2015&nbsp;&nbsp;www.sharephoto.com&nbsp;&nbsp;粤ICP备13014270号-4
                </p>
            </div>
        </div>
    </div>
</footer>
<!--footer-->
		<script src="${pageContext.request.contextPath}/JS/jquery-1.12.3.min.js"></script>
<script src="${pageContext.request.contextPath}/JS/bootstrap.min.js"></script>
<script type="text/javascript">
 $(function(){
        $('#username').focus();
    });
</script>
</body>

</html>